package com.qumitech.visualnovel.model.dao.console;

import com.qumitech.visualnovel.controller.vo.voiceRoom.VoiceRoomStatisticDTO;

import java.util.Date;

public class StreamerDataDO {
    private Integer id;

    private String appId;

    private String appChannel;

    private String appName;

    private String appVersion;

    private String logSeq;

    private String voiceRoomId;

    private String voiceRoomName;

    private Integer streamerId;

    private String streamerNickname;

    private String streamerChannel;

    private String streamerSystem;

    private Date upperWheatTime;

    private Date lowerWheatTime;

    private Integer streamerDuration;

    private Integer radioDuration;

    private Integer entertainmentDuration;

    private Integer userCount;

    private Integer fansCount;

    private Date createdAt;

    private Date updatedAt;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId == null ? null : appId.trim();
    }

    public String getAppChannel() {
        return appChannel;
    }

    public void setAppChannel(String appChannel) {
        this.appChannel = appChannel == null ? null : appChannel.trim();
    }

    public String getAppName() {
        return appName;
    }

    public void setAppName(String appName) {
        this.appName = appName == null ? null : appName.trim();
    }

    public String getAppVersion() {
        return appVersion;
    }

    public void setAppVersion(String appVersion) {
        this.appVersion = appVersion == null ? null : appVersion.trim();
    }

    public String getLogSeq() {
        return logSeq;
    }

    public void setLogSeq(String logSeq) {
        this.logSeq = logSeq == null ? null : logSeq.trim();
    }

    public String getVoiceRoomId() {
        return voiceRoomId;
    }

    public void setVoiceRoomId(String voiceRoomId) {
        this.voiceRoomId = voiceRoomId == null ? null : voiceRoomId.trim();
    }

    public String getVoiceRoomName() {
        return voiceRoomName;
    }

    public void setVoiceRoomName(String voiceRoomName) {
        this.voiceRoomName = voiceRoomName == null ? null : voiceRoomName.trim();
    }

    public Integer getStreamerId() {
        return streamerId;
    }

    public void setStreamerId(Integer streamerId) {
        this.streamerId = streamerId;
    }

    public String getStreamerNickname() {
        return streamerNickname;
    }

    public void setStreamerNickname(String streamerNickname) {
        this.streamerNickname = streamerNickname == null ? null : streamerNickname.trim();
    }

    public String getStreamerChannel() {
        return streamerChannel;
    }

    public void setStreamerChannel(String streamerChannel) {
        this.streamerChannel = streamerChannel == null ? null : streamerChannel.trim();
    }

    public String getStreamerSystem() {
        return streamerSystem;
    }

    public void setStreamerSystem(String streamerSystem) {
        this.streamerSystem = streamerSystem == null ? null : streamerSystem.trim();
    }

    public Date getUpperWheatTime() {
        return upperWheatTime;
    }

    public void setUpperWheatTime(Date upperWheatTime) {
        this.upperWheatTime = upperWheatTime;
    }

    public Date getLowerWheatTime() {
        return lowerWheatTime;
    }

    public void setLowerWheatTime(Date lowerWheatTime) {
        this.lowerWheatTime = lowerWheatTime;
    }

    public Integer getStreamerDuration() {
        return streamerDuration;
    }

    public void setStreamerDuration(Integer streamerDuration) {
        this.streamerDuration = streamerDuration;
    }

    public Integer getUserCount() {
        return userCount;
    }

    public void setUserCount(Integer userCount) {
        this.userCount = userCount;
    }

    public Integer getFansCount() {
        return fansCount;
    }

    public void setFansCount(Integer fansCount) {
        this.fansCount = fansCount;
    }

    public Date getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }

    public Date getUpdatedAt() {
        return updatedAt;
    }

    public void setUpdatedAt(Date updatedAt) {
        this.updatedAt = updatedAt;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", appId=").append(appId);
        sb.append(", appChannel=").append(appChannel);
        sb.append(", appName=").append(appName);
        sb.append(", appVersion=").append(appVersion);
        sb.append(", logSeq=").append(logSeq);
        sb.append(", voiceRoomId=").append(voiceRoomId);
        sb.append(", voiceRoomName=").append(voiceRoomName);
        sb.append(", streamerId=").append(streamerId);
        sb.append(", streamerNickname=").append(streamerNickname);
        sb.append(", streamerChannel=").append(streamerChannel);
        sb.append(", streamerSystem=").append(streamerSystem);
        sb.append(", upperWheatTime=").append(upperWheatTime);
        sb.append(", lowerWheatTime=").append(lowerWheatTime);
        sb.append(", streamerDuration=").append(streamerDuration);
        sb.append(", userCount=").append(userCount);
        sb.append(", fansCount=").append(fansCount);
        sb.append(", createdAt=").append(createdAt);
        sb.append(", updatedAt=").append(updatedAt);
        sb.append("]");
        return sb.toString();
    }

    public VoiceRoomStatisticDTO convertVoiceRoomStatisticDTO(){
        VoiceRoomStatisticDTO voiceRoomStatisticDTO = new VoiceRoomStatisticDTO();
        voiceRoomStatisticDTO.setAppChannel(appChannel);
        voiceRoomStatisticDTO.setAppVersion(appVersion);
        voiceRoomStatisticDTO.setEntertainmentDuration(Long.valueOf(entertainmentDuration));
        voiceRoomStatisticDTO.setRadioDuration(Long.valueOf(radioDuration));
        voiceRoomStatisticDTO.setFansCount(Long.valueOf(fansCount));
        voiceRoomStatisticDTO.setStreamerId(streamerId);
        voiceRoomStatisticDTO.setStreamerNickname(streamerNickname);
        voiceRoomStatisticDTO.setVoiceRoomId(voiceRoomId);
        voiceRoomStatisticDTO.setVoiceRoomName(voiceRoomName);
        voiceRoomStatisticDTO.setTotalAccountNumber(Long.valueOf(userCount));
        voiceRoomStatisticDTO.setUpperWheatTime(upperWheatTime);
        voiceRoomStatisticDTO.setLowerWheatTime(lowerWheatTime);
        return voiceRoomStatisticDTO;
    }

    public Integer getRadioDuration() {
        return radioDuration;
    }

    public void setRadioDuration(Integer radioDuration) {
        this.radioDuration = radioDuration;
    }

    public Integer getEntertainmentDuration() {
        return entertainmentDuration;
    }

    public void setEntertainmentDuration(Integer entertainmentDuration) {
        this.entertainmentDuration = entertainmentDuration;
    }
}